extends ../layout

append css
    link(rel='stylesheet', href='/components/font-awesome/css/font-awesome.css')
    link(rel='stylesheet', href='/css/blog.css')

block main
    block header
        .blog-masthead
            .container
                nav.blog-nav.pull-left
                    if pageName === '/posts'
                        a.blog-nav-item.active(href="/")  首页
                    else
                        a.blog-nav-item(href="/")  首页

                    if pageName === '/about'
                        a.blog-nav-item.active(href="/about") 关于
                    else
                        a.blog-nav-item(href="/about") 关于

                    if pageName === '/contact'
                        a.blog-nav-item.active(href="/contact") 联系
                    else
                        a.blog-nav-item(href="/contact") 联系


                form.navbar-form.pull-right(method="get", action="/posts/")
                    input.form-control(type="text", name="keyword", placeholder="搜索...")

    .container
        .row
            .col-sm-8.blog-main
                != messages()
                block content
            .col-sm-3.col-sm-offset-1.blog-sidebar
                .sidebar-module
                    h4 文章分类
                    ol.list-unstyled
                        each category in categories
                            li
                                a(href="/posts/category/" + category.name, target="_blank")
                                    = category.name

                .sidebar-module
                    h4 友情链接
                    ol.list-unstyled
                        li
                            a(href="#") GitHub
                        li
                            a(href="#") Twitter
                        li
                            a(href="#") Facebook

    block footer
        footer.blog-footer
            p NodeBlog by wangshijun@maiziedu.com
            p
                a(href="#") 回到顶部
                &nbsp;&nbsp;&nbsp;&nbsp;
                a(href="/admin/users/login") 用户登录
                &nbsp;&nbsp;&nbsp;&nbsp;
                a(href="/admin/users/register") 用户注册


                